<!DOCTYPE html>
<html>
<!-- Created by GNU Texinfo 7.1, https://www.gnu.org/software/texinfo/ -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<!-- This file documents the use of the GNU compilers.

Copyright © 1988-2023 Free Software Foundation, Inc.

Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with the
Invariant Sections being "Funding Free Software", the Front-Cover
Texts being (a) (see below), and with the Back-Cover Texts being (b)
(see below).  A copy of the license is included in the section entitled
"GNU Free Documentation License".

(a) The FSF's Front-Cover Text is:

A GNU Manual

(b) The FSF's Back-Cover Text is:

You have freedom to copy and modify this GNU Manual, like GNU
     software.  Copies published by the Free Software Foundation raise
     funds for GNU development. -->
<title>C++ Extensions (Using the GNU Compiler Collection (GCC))</title>

<meta name="description" content="C++ Extensions (Using the GNU Compiler Collection (GCC))">
<meta name="keywords" content="C++ Extensions (Using the GNU Compiler Collection (GCC))">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="makeinfo">
<meta name="viewport" content="width=device-width,initial-scale=1">

<link href="index.html" rel="start" title="Top">
<link href="Indices.html" rel="index" title="Indices">
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
<link href="index.html" rel="up" title="Top">
<link href="Objective_002dC.html" rel="next" title="Objective-C">
<link href="C-Extensions.html" rel="prev" title="C Extensions">
<style type="text/css">
<!--
a.copiable-link {visibility: hidden; text-decoration: none; line-height: 0em}
kbd.key {font-style: normal}
span:hover a.copiable-link {visibility: visible}
-->
</style>


</head>

<body lang="en_US">
<div class="chapter-level-extent" id="C_002b_002b-Extensions">
<div class="nav-panel">
<p>
Next: <a href="Objective_002dC.html" accesskey="n" rel="next">GNU Objective-C Features</a>, Previous: <a href="C-Extensions.html" accesskey="p" rel="prev">Extensions to the C Language Family</a>, Up: <a href="index.html" accesskey="u" rel="up">Introduction</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Indices.html" title="Index" rel="index">Index</a>]</p>
</div>
<hr>
<h2 class="chapter" id="Extensions-to-the-C_002b_002b-Language"><span>7 Extensions to the C++ Language<a class="copiable-link" href="#Extensions-to-the-C_002b_002b-Language"> &para;</a></span></h2>
<a class="index-entry-id" id="index-extensions_002c-C_002b_002b-language"></a>
<a class="index-entry-id" id="index-C_002b_002b-language-extensions"></a>

<p>The GNU compiler provides these extensions to the C++ language (and you
can also use most of the C language extensions in your C++ programs).  If you
want to write code that checks whether these features are available, you can
test for the GNU compiler the same way as for C programs: check for a
predefined macro <code class="code">__GNUC__</code>.  You can also use <code class="code">__GNUG__</code> to
test specifically for GNU C++ (see <a data-manual="cpp" href="https://gcc.gnu.org/onlinedocs/cpp/Common-Predefined-Macros.html#Common-Predefined-Macros">Predefined Macros</a> in <cite class="cite">The GNU C Preprocessor</cite>).
</p>

<ul class="mini-toc">
<li><a href="C_002b_002b-Volatiles.html" accesskey="1">When is a Volatile C++ Object Accessed?</a></li>
<li><a href="Restricted-Pointers.html" accesskey="2">Restricting Pointer Aliasing</a></li>
<li><a href="Vague-Linkage.html" accesskey="3">Vague Linkage</a></li>
<li><a href="C_002b_002b-Interface.html" accesskey="4">C++ Interface and Implementation Pragmas</a></li>
<li><a href="Template-Instantiation.html" accesskey="5">Where&rsquo;s the Template?</a></li>
<li><a href="Bound-member-functions.html" accesskey="6">Extracting the Function Pointer from a Bound Pointer to Member Function</a></li>
<li><a href="C_002b_002b-Attributes.html" accesskey="7">C++-Specific Variable, Function, and Type Attributes</a></li>
<li><a href="Function-Multiversioning.html" accesskey="8">Function Multiversioning</a></li>
<li><a href="Type-Traits.html" accesskey="9">Type Traits</a></li>
<li><a href="C_002b_002b-Concepts.html">C++ Concepts</a></li>
<li><a href="Deprecated-Features.html">Deprecated Features</a></li>
<li><a href="Backwards-Compatibility.html">Backwards Compatibility</a></li>
</ul>
</div>



</body>
</html>
